home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Comms Spectacular / AppleTalk Remote Access / NetComm ARA Scripts V1.1 / NetComm Pocket Rocket PA < prev    next >
Encoding:
Text File  |  1994-04-07  |  3.8 KB  |  240 lines  |  [mlts/slnk]

  1.  
  2. !"NetComm Pocket Rocket PA - V32bis 7th April 1994 - NJS - v1.1
  3. !
  4. @ORIGINATE
  5. @ANSWER
  6. !
  7. @LABEL 1
  8. serreset 19200, 0, 8, 1
  9. !
  10. ! first sync up the modem
  11. !
  12. matchclr
  13. matchstr 1 3 "A"
  14. settries 0
  15. @LABEL 2
  16. write "A"
  17. matchread 10
  18. inctries
  19. iftries 4 3
  20. jump 2
  21. @LABEL 3
  22. matchclr
  23. settries 0
  24. matchstr 1 4 "OK\13\10"
  25. write "T\13"
  26. matchread 30
  27. !
  28. !    Now, recall the modems factory configuration
  29. !
  30. @LABEL 4
  31. matchstr 1 5 "OK\13\10"
  32. write "AT&F\13"
  33. matchread 30
  34. inctries
  35. iftries 2 59
  36. ! Modem is not responding, reset
  37. DTRClear
  38. pause 5
  39. DTRSet
  40. jump 4
  41. !
  42. ! Next, Set up the configuration:
  43. ! Echo off, turn off auto answer
  44. ! Ignore DTR
  45. !
  46. @LABEL 5
  47. matchstr 1 6 "OK\13\10"
  48. write "ATE0&D0S0=0\13"
  49. matchread 30
  50. jump 59
  51. !
  52. ! Connect in Constant speed mode, no MNP, Hardware flow control 
  53. ! Dont look for Dial Tone
  54. @LABEL 6
  55. matchstr 1 7 "OK\13\10"
  56. write "AT\\N0&D0&K3%C0X1&C1\13"
  57. matchread 30
  58. jump 59
  59. !
  60. ! Set up the speaker: If speaker flag is "1", jump to 8;  else turn off speaker
  61. @LABEL 7
  62. ifstr 2 8 "1"
  63. matchstr 1 8 "OK\13\10"
  64. write "ATM0\13"
  65. matchread 30
  66. jump 59
  67. !
  68. ! The modem is ready.  So enable answering, or originate a call
  69. !
  70. @LABEL 8
  71. ifANSWER 30
  72. ! Dial with V32bis enabled
  73. note "Dialing ^1" 3
  74. write "ATS0=0F0DT^1\13"
  75. !
  76. @LABEL 9
  77. matchstr 1 11 "CONNECT 1200\13\10"
  78. matchstr 2 12 "CONNECT 2400\13\10"
  79. matchstr 3 13 "CONNECT 4800\13\10"
  80. matchstr 4 14 "CONNECT 7200\13\10"
  81. matchstr 5 15 "CONNECT 9600\13\10"
  82. matchstr 6 16 "CONNECT 12000\13\10"
  83. matchstr 7 17 "CONNECT 14400\13\10"
  84. matchstr 8 50 "NO CARRIER\13\10"
  85. matchstr 9 50 "ERROR\13\10"
  86. matchstr 10 52 "NO DIALTONE\13\10"
  87. matchstr 11 53 "BUSY\13\10"
  88. matchstr 12 54 "NO ANSWER\13\10"
  89. matchread 700
  90. jump 59
  91. !
  92. @LABEL 11
  93. note "Modem connection established at 1200 bps." 2
  94. CommunicatingAt 1200
  95. jump 20
  96. !
  97. @LABEL 12
  98. note "Modem connection established at 2400 bps." 2
  99. CommunicatingAt 2400
  100. jump 20
  101. !
  102. @LABEL 13
  103. note "Modem connection established at 4800 bps." 2
  104. CommunicatingAt 4800
  105. jump 20
  106. !
  107. @LABEL 14
  108. note "Modem connection established at 7200 bps." 2
  109. CommunicatingAt 7200
  110. jump 20
  111. !
  112. @LABEL 15
  113. note "Modem connection established at 9600 bps." 2
  114. CommunicatingAt 9600
  115. jump 20
  116. !
  117. @LABEL 16
  118. note "Modem connection established at 12000 bps." 2
  119. CommunicatingAt 12000
  120. jump 20
  121. !
  122. @LABEL 17
  123. note "Modem connection established at 14400 bps." 2
  124. CommunicatingAt 14400
  125. jump 20
  126. !
  127. @LABEL 20
  128. HSReset 0 1 0 0 0 1
  129. ifANSWER 21
  130. pause 30
  131. !
  132. @LABEL 21
  133. exit 0
  134. !
  135. ! @ANSWER
  136. ! Set up the modem to answer
  137. !
  138. @LABEL 30
  139. write "ATS0=2F0\13"
  140. matchstr 1 31 "OK\13\10"
  141. matchread 30
  142. jump 59
  143. !
  144. @LABEL 31
  145. matchstr 1  32 "RING\13\10"
  146. matchstr 2  11 "CONNECT 1200\13\10"
  147. matchstr 3  12 "CONNECT 2400\13\10"
  148. matchstr 4  13 "CONNECT 4800\13\10"
  149. matchstr 5  14 "CONNECT 7200\13\10"
  150. matchstr 6  15 "CONNECT 9600\13\10"
  151. matchstr 7  16 "CONNECT 12000\13\10"
  152. matchstr 8  17 "CONNECT 14400\13\10"
  153. matchstr 9  50 "NO CARRIER\13\10"
  154. matchstr 10  50 "ERROR\13\10"
  155. matchstr 11  52 "NO DIALTONE\13\10"
  156. matchstr 12  53 "BUSY\13\10"
  157. matchstr 13 54 "NO ANSWER\13\10"
  158. matchread 700
  159. jump 31
  160. !
  161. @LABEL 32
  162. userhook 1
  163. note "Answering phone…" 2
  164. jump 31
  165. !
  166. ! 50: error messages
  167. !
  168. @LABEL 50
  169. exit -6021
  170. !
  171. @LABEL 52
  172. exit -6020
  173. !
  174. @LABEL 53
  175. exit -6022
  176. !
  177. @LABEL 54
  178. exit -6023
  179. !
  180. @LABEL 59
  181. exit -6019
  182. !
  183. ! Hang up the modem
  184. !
  185. @HANGUP
  186. @LABEL 60
  187. settries 0
  188. @LABEL 61
  189. matchclr
  190. matchstr 1 63 "OK\13\10"
  191. matchstr 2 63 "NO CARRIER\13\10"
  192. matchstr 3 63 "ERROR\13\10"
  193. write "ATH\13"
  194. matchread 30
  195. inctries
  196. iftries 3 63
  197. ! no response, try escape sequence
  198. matchclr
  199. matchstr 1 62 "OK\13\10"
  200. write "+++"
  201. matchread 20
  202. !
  203. ! No response from modem, toggle DTR
  204. !
  205. DTRClear
  206. pause 5
  207. DTRSet
  208. jump 61
  209. !
  210. @LABEL 62
  211. pause 5
  212. write "ATH0\13"
  213. matchstr 1 63 "OK\13\10"
  214. matchstr 2 63 "NO CARRIER\13\10"
  215. matchstr 3 63 "ERROR\13\10"
  216. matchread 70
  217. jump 61
  218. !
  219. ! Recall factory settings
  220. !
  221. @LABEL 63
  222. pause 5
  223. matchclr
  224. matchstr 1 64 "OK\13\10"
  225. write "AT&F\13"
  226. matchread 30
  227. !
  228. ! Turn off auto answer
  229. !
  230. @LABEL 64
  231. write "ATS0=0\13"
  232. matchstr 1 65 "OK\13\10"
  233. matchread 30
  234. !
  235. !
  236. @LABEL 65
  237. exit 0
  238.